//
// Created by guoshunw on 24-3-31.
//

#include "enum_to_string.h"

// define enum to string for enum OMX_ERRORTYPE

GENERATE_ENUM_MAP(OMX_ERRORTYPE,
                  ENUM_V_(OMX_ErrorNone),
                  ENUM_V_(OMX_ErrorInsufficientResources),
                  ENUM_V_(OMX_ErrorUndefined),
                  ENUM_V_(OMX_ErrorInvalidComponentName),
                  ENUM_V_(OMX_ErrorComponentNotFound),
                  ENUM_V_(OMX_ErrorBadParameter),
                  ENUM_V_(OMX_ErrorNotImplemented),
                  ENUM_V_(OMX_ErrorUnderflow),
                  ENUM_V_(OMX_ErrorOverflow),
                  ENUM_V_(OMX_ErrorHardware),
                  ENUM_V_(OMX_ErrorInvalidState),
                  ENUM_V_(OMX_ErrorStreamCorrupt),
                  ENUM_V_(OMX_ErrorSameState),
                  ENUM_V_(OMX_ErrorPortUnpopulated),
                  ENUM_V_(OMX_ErrorIncorrectStateOperation),
                  ENUM_V_(OMX_ErrorPortsNotCompatible),
                  ENUM_V_(OMX_ErrorDynamicResourcesUnavailable),
                  ENUM_V_(OMX_ErrorIncorrectStateTransition), )

// define enum to string for enum OMX_EVENTTYPE
GENERATE_ENUM_MAP(OMX_EVENTTYPE,
                  ENUM_V_(OMX_EventCmdComplete),
                  ENUM_V_(OMX_EventError),
                  ENUM_V_(OMX_EventMark),
                  ENUM_V_(OMX_EventPortSettingsChanged),
                  ENUM_V_(OMX_EventBufferFlag),
                  ENUM_V_(OMX_EventResourcesAcquired),
                  ENUM_V_(OMX_EventComponentResumed),
                  ENUM_V_(OMX_EventDynamicResourcesAvailable),
                  ENUM_V_(OMX_EventPortFormatDetected),
                  ENUM_V_(OMX_EventKhronosExtensions),
                  ENUM_V_(OMX_EventVendorStartUnused),
                  ENUM_V_(OMX_EventMax), )

GENERATE_ENUM_MAP(OMX_COMMANDTYPE,
                  ENUM_V_(OMX_CommandStateSet),
                  ENUM_V_(OMX_CommandFlush),
                  ENUM_V_(OMX_CommandPortDisable),
                  ENUM_V_(OMX_CommandPortEnable),
                  ENUM_V_(OMX_CommandMarkBuffer),
                  ENUM_V_(OMX_CommandKhronosExtensions),
                  ENUM_V_(OMX_CommandVendorStartUnused),
                  ENUM_V_(OMX_CommandMax), )


GENERATE_ENUM_MAP(OMX_STATETYPE,
                  ENUM_V_(OMX_StateInvalid),
                  ENUM_V_(OMX_StateLoaded),
                  ENUM_V_(OMX_StateIdle),
                  ENUM_V_(OMX_StateExecuting),
                  ENUM_V_(OMX_StatePause),
                  ENUM_V_(OMX_StateWaitForResources),
                  ENUM_V_(OMX_StateKhronosExtensions),
                  ENUM_V_(OMX_StateVendorStartUnused),
                  ENUM_V_(OMX_StateMax), )